﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Marvin.Data.Linq2Sql;

namespace Marvin.Data.Entities
{
    public class WorkPeriod : EntityBase
    {
        #region Encapsulate data entity
        protected TWorkPeriod workPeriod;
        protected override IDataEntity DataEntity
        {
            get { return workPeriod as IDataEntity; }
            set { workPeriod = value as TWorkPeriod; }
        }
        #endregion

        #region Properties
        public override int Id
        {
            get { return workPeriod.IWorkPeriodId; }
            set { workPeriod.IWorkPeriodId = value; }
        }

        public int WorkDayId
        {
            get { return workPeriod.IWorkDayId; }
            set { workPeriod.IWorkDayId = value; }
        }

        public int? ProjectCodeId
        {
            get { return workPeriod.IProjectCodeId; }
            set { workPeriod.IProjectCodeId = value; }
        }

        public DateTime? Start
        {
            get { return workPeriod.DStart; }
            set { workPeriod.DStart = value; }
        }

        public DateTime? End
        {
            get { return workPeriod.DEnd; }
            set { workPeriod.DEnd = value; }
        }

        public decimal Length
        {
            get { return workPeriod.NLength; }
            set { workPeriod.NLength = value; }
        }
        #endregion
    }
}
